package com.zhangxu.microservice.auth.vo.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 更新系统请求
 */
@Data
@Schema(description = "更新系统请求")
public class UpdateSystemReq {

    @Schema(description = "系统编码", example = "employee")
    @NotBlank(message = "系统编码不能为空")
    @Pattern(regexp = "^[a-z_]+$", message = "系统编码只能包含小写字母和下划线")
    @Size(max = 50, message = "系统编码长度不能超过50个字符")
    private String systemCode;

    @Schema(description = "系统名称", example = "员工管理系统")
    @NotBlank(message = "系统名称不能为空")
    @Size(max = 100, message = "系统名称长度不能超过100个字符")
    private String name;

    @Schema(description = "排序值", example = "1")
    @NotNull(message = "排序值不能为空")
    private Integer sort;

    @Schema(description = "系统负责人用户ID", example = "1")
    @NotNull(message = "系统负责人用户ID不能为空")
    private Long ownerId;

    @Schema(description = "备注", example = "这是员工管理系统")
    @Size(max = 255, message = "备注长度不能超过255个字符")
    private String remark;
}